package com.eorchis.module.auditing.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import java.util.Date;


import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.basedao.entity.impl.AbstractBaseEntity;
import com.eorchis.module.classuser.domain.ClassUser;
import com.eorchis.module.user.domain.User;

/**
 * Title: Auditing<br>
 * Description: 班级审核人员信息实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2013-12-31
 * @version $Revision$
 */
@Entity
@Table(name = "AUDITING")
public class Auditing extends AbstractBaseEntity implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String auditingId;//审核ID
	private Integer auditingState;//审核状态 1:审核通过 2:审核未通过3:未审核
	private String auditingOpinion;//审核意见
	private Date auditingDate;//审核日期
	private User auditingUser;//审核人
	private ClassUser classUser;//审核班级人员对象
	private String auditingType;//审核类型   人员：shry   学时：shxs
	/**
	 * 获取ID
	 */	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="AUDITING_ID")
	public String getAuditingId() {
		return auditingId;
	}
	/**
	 * 设置ID
	 */		
	public void setAuditingId(String auditingId) {
		this.auditingId = auditingId;
	}
	/**
	 * 获取审核状态
	 */	
	@Column(name="AUDITING_STATE")
	public Integer getAuditingState() {
		return auditingState;
	}
	/**
	 * 设置审核状态
	 */		
	public void setAuditingState(Integer auditingState) {
		this.auditingState = auditingState;
	}
	/**
	 * 获取审核意见
	 */	
	@Column(name="AUDITING_OPINION")
	public String getAuditingOpinion() {
		return auditingOpinion;
	}
	/**
	 * 设置审核意见
	 */		
	public void setAuditingOpinion(String auditingOpinion) {
		this.auditingOpinion = auditingOpinion;
	}
	/**
	 * 获取日期
	 */	
	@Column(name="AUDITING_DATE")
	public Date getAuditingDate() {
		return auditingDate;
	}
	/**
	 * 设置日期
	 */		
	public void setAuditingDate(Date auditingDate) {
		this.auditingDate = auditingDate;
	}
	/**
	 * 获取审核人
	 */	
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name="AUDITING_USER_ID")
	public User getAuditingUser() {
		return auditingUser;
	}
	/**
	 * 设置审核人
	 */	
	public void setAuditingUser(User auditingUser) {
		this.auditingUser = auditingUser;
	}
	/**
	 * 获取班级人员对象
	 */	
	@ManyToOne(fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name="CLASS_USER_ID")
	public ClassUser getClassUser() {
		return classUser;
	}
	/**
	 * 设置班级人员对象
	 */	
	public void setClassUser(ClassUser classUser) {
		this.classUser = classUser;
	}
	
	/**
	 * 获取审核类型
	 */
	@Column(name="AUDITING_TYPE")
	public String getAuditingType() {
		return auditingType;
	}
	/**
	 * 设置审核类型
	 */
	public void setAuditingType(String auditingType) {
		this.auditingType = auditingType;
	}
	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "ID======>" + getAuditingId()+"\n用户状态======>" + getAuditingState()+"\n审核意见======>" + getAuditingOpinion()+"\n日期======>" + getAuditingDate();
	}
}
